package com.wehotel.weschedule.feign;

import com.wehotel.uni.common.bean.LoginRequestVo;
import com.wehotel.uni.common.query.UserQuery;
import com.wehotel.uni.common.query.UserSearchBean;
import com.wehotel.uni.common.request.PrivilegeRequest;
import com.wehotel.uni.common.view.Pager;
import com.wehotel.uni.common.view.ResultBean;
import com.wehotel.uni.common.view.SingleUserItemVo;
import com.wehotel.uni.common.view.UniResourceNodeLayer;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
 * 请求类型里字段并不一定正确，修改时请注意测试。
 */
@FeignClient(name = "uni-user-api",configuration = UniFeignConfiguration.class)
public interface UniUserApi {

    @RequestMapping(value = "hotel-manage-platform-api/rest/user/search/v1", method = RequestMethod.POST)
    public ResultBean<Pager<List<SingleUserItemVo>>> searchUser(UserSearchBean userSearchBean);

//    @RequestMapping(value = "hotel-manage-platform-api/rest/user/search/v1", method = RequestMethod.POST)
//    public ResultBean<Pager<SingleUserItemVo>> searchUser(UserSearchBean userSearchBean);

    /**
     *
     * @param loginRequestVo
     * @return
     */
    @RequestMapping(value = "hotel-manage-platform-api/sso/getUser/v2", method = RequestMethod.POST)
    public ResultBean<SingleUserItemVo> getUserWihtToken(LoginRequestVo loginRequestVo);

    @RequestMapping(value = "hotel-manage-platform-api/rest/login/account/v1", method = RequestMethod.POST)
    public ResultBean<UserQuery> loginPw(LoginRequestVo loginRequestVo);

    @RequestMapping(value = "hotel-manage-platform-api/privilege/query", method = RequestMethod.POST)
    public ResultBean<UniResourceNodeLayer> getPrivilege(PrivilegeRequest privilegeRequest);


}
